package com.improve.frame.common.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;

import java.io.Serializable;

/**
 * @Description
 *      Id基类
 * @Author wzxing918
 * @Date 2021-03-31
 * @Version 1.0.0
 **/
@Data
public class IdEntity<T extends Model<?>> extends Model<T> {
    /**
     * 主键
     */
    @TableId
    protected Long id;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
